<template>
  <div class="detail-container">
    <div class="container">
      <div class="aside">
        <!-- 个人肖像 -->
        <section class="me">
          <h1 class="name">{{stuData.stuName}}</h1>
        </section>

        <!-- 基本信息 -->
        <section class="profile info-unit">
          <h2>
            <i class="el-icon-user-solid" aria-hidden="true"></i>基本信息</h2>
          <hr/>
          <ul>
            <li>
              <label>性别</label>
              <span v-if="stuData.stuGender==0">女</span>
              <span v-if="stuData.stuGender==1">男</span>
            </li>
            <li>
              <label>出生日期</label>
              <span>{{stuData.stuBirth}}</span>
            </li>
            <li>
              <label>考生号</label>
              <span>{{stuData.stuExamId}}</span>
            </li>
            <li>
              <label>身份证号</label>
              <span>{{stuData.stuCardId}}</span>
            </li>

            <li>
              <label>户口所在地</label>
              <span>{{stuData.stuResidenceAddress}}</span>
            </li>
            <li>
              <label>毕业学校</label>
              <span>{{stuData.stuUgSchool}}</span>
            </li>
            <li>
              <label>毕业专业</label>
              <span>{{stuData.stuUgMajor}}</span>
            </li>
<!--            <li>-->
<!--              <label>毕业年份</label>-->
<!--              <span>{{stuData.stuGraduateDate}}</span>-->
<!--            </li>-->
            <li>
              <label>毕业时间</label>
              <span>{{stuData.stuUgTime}}</span>
            </li>
          </ul>
        </section>

        <!-- 联系方式 -->
        <section class="contact info-unit">
          <h2>
            <i class="el-icon-phone" aria-hidden="true"></i>联系方式</h2>
          <hr/>
          <ul>
            <li>
              <label>手机号</label>
              <span>{{stuData.stuMobile}}</span>
            </li>
            <li>
              <label>邮箱</label>
              <span>{{stuData.stuEmail}}</span>
            </li>
          </ul>
        </section>

        <!-- 报考信息 -->
        <section class="skill info-unit">
          <h2>
            <i class="el-icon-position"></i>报考信息</h2>
          <hr/>
          <ul>
            <li>
              <label>考生类别</label>
              <span>{{stuData.stuSourceType}}</span>
            </li>
            <li>
              <label>报考学校</label>
              <span>{{stuData.stuPgFirstWishSchool}}</span>
            </li>
            <li>
              <label>报考专业</label>
              <span>{{stuData.stuPgFirstWishMajor}}</span>
            </li>
            <li>
              <label>专业方向</label>
              <span>{{stuData.stuPgFirstWishDirection}}</span>
            </li>
          </ul>
        </section>

        <section class="skill info-unit">
          <h2><i class="el-icon-s-promotion" aria-hidden="true"></i>考试分数</h2>
          <hr/>
          <ul>
            <li>
              <label>外国语</label>
              <span>{{stuData.stuPgExamForeignScore}}</span>
            </li>
            <li>
              <label v-if="stuData.stuPgFirstWishMajor!='会计'">政治理论</label>
              <label v-if="stuData.stuPgFirstWishMajor=='会计'">管理类联考</label>
              <span v-if="stuData.stuPgExamPolitical!=0" >{{stuData.stuPgExamPolitical}}</span>
              <span v-if="stuData.stuPgExamPolitical==0">/</span>
            </li>
            <li v-if="stuData.stuPgFirstWishMajor!='会计'">
              <label>数学</label>
              <span v-if="stuData.stuPgExamMath!=0">{{stuData.stuPgExamMath}}</span>
              <span v-else>/</span>
            </li>

            <li v-if="stuData.stuPgFirstWishMajor!='会计'">
              <label>自命题</label>
              <span v-if="stuData.stuPgExamSchool!=0">{{stuData.stuPgExamSchool}}</span>
              <span v-else>/</span>
            </li>
            <li>
              <label>初试总分</label>
              <span>{{stuData.stuPgExamTotal}}</span>
            </li>
            <li>
              <label>复试成绩</label>
              <span>{{stuData.stuPgReview}}</span>
            </li>
            <li>
              <label>总成绩</label>
              <span>{{stuData.stuPgTotal}}</span>
            </li>
          </ul>
        </section>

        <section class="skill info-unit">
          <h2><i class="el-icon-data-analysis" aria-hidden="true"></i>调剂信息</h2>
          <hr/>
          <ul>
            <li>
              <label>调剂专业</label>
              <span>{{stuData.stuPgSecondMajor}}</span>
            </li>
            <li>
              <label>调剂专业方向</label>
              <span>{{stuData.stuPgSecondDirection}}</span>
            </li>
          </ul>
        </section>


      </div>

      <div class="main">

        <!-- 奖励处分 -->
        <section class="edu info-unit">
          <h2>
            <i class="el-icon-collection" aria-hidden="true"></i>奖励处分</h2>
          <hr/>
          <div v-html="stuData.stuReward">

          </div>
        </section>

        <!-- 简历 -->
        <section class="edu info-unit">
          <h2>
            <i class="el-icon-user-solid" aria-hidden="true"></i>简历</h2>
          <hr/>
          <div class="html-resume" v-html="stuData.stuResume">

          </div>
        </section>
        <section class="edu info-unit">
          <h2>
            <i class="el-icon-office-building" aria-hidden="true"></i>支撑材料</h2>
          <hr/>
          <div class="html-dependence" v-html="stuData.stuDependence">

          </div>
        </section>

        <!-- 家庭成员信息 -->
        <section class="project info-unit">
          <h2>
            <i class="fa fa-terminal" aria-hidden="true"></i>家庭成员信息</h2>
          <hr/>
          <ul>
            <li v-for="member in stuData.members">
              <h3>
                <span><b>{{member.name}}</b></span>
              </h3>
              <ul class="info-content">
                <li>
                  <label>与学生关系</label>
                  <span>{{member.relation}}</span>
                </li>
                <li v-if="member.gender==0">
                  <label>性别</label>
                  <span>女</span>
                </li>
                <li v-if="member.gender==1">
                  <label>性别</label>
                  <span>男</span>
                </li>

                <li >
                  <label>手机号</label>
                  <span>{{member.phone}}</span>
                </li>

                <li>
                  <label>民族</label>
                  <span>{{member.nation}}</span>
                </li>

                <li>
                  <label>职业</label>
                  <span>{{member.profession}}</span>
                </li>

                <li>
                  <label>家庭地址</label>
                  <span>{{member.address}}</span>
                </li>
              </ul>
            </li>
          </ul>
        </section>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      stuData: {
        type: Object
      }
    },
    data(){
      return {

      }
    }


  }
</script>

<style>
  .html-resume img{
    width: 90%;
  }

  .html-dependence img {
    width: 90%;
  }
</style>
<style scoped>
  .detail-container {
    /*background: #e5e5e5 url(../../assets/images/background.png);*/
    width: 100%;
    height: 90%;
    overflow-x: hidden;
    padding: 2rem 5%;
    padding-bottom: 2%;
    box-sizing: border-box;
    font-size: .9em;
  }

  .detail-container .fa {
    margin-right: .3em;
  }

  .detail-container .info-unit {
    font-size: 1em;
    margin-bottom: 1rem;
  }

  .detail-container .info-unit h2 {
    font-size: 20px;
    font-weight: 700;
  }

  .detail-container .info-unit h3 {
    font-weight: 300;
  }


  /* -------------------------------------------------
   * 主体部分
   * ------------------------------------------------- */


  .container .aside {
    position: absolute;
    width: 25rem;
    height: 1400px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 20px #bbb;
    box-sizing: border-box;
    overflow: auto;
    padding: 1rem;
  }

  .aside::-webkit-scrollbar {
    /*滚动条整体样式*/
    width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
    height: 1px;
  }

  .aside::-webkit-scrollbar-thumb {
    /*滚动条里面小方块*/
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    background: #ccc;
  }

  .aside::-webkit-scrollbar-track {
    /*滚动条里面轨道*/
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    background: #ededed;
  }

  .container .aside .me {
    text-align: center;
    margin-bottom: 2rem;
  }

  .container .aside .me .portrait {
    margin: 0 auto;
    margin-bottom: 1rem;
    width: 8rem;
    height: 8rem;
    overflow: hidden;
    position: relative;
  }

  .container .aside .me .portrait img {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
  }

  .container .aside .info-unit ul li {
    margin: 10px 0;
  }

  .container .aside .info-unit ul li label {
    display: inline-block;
    width: 35%;
  }

  .container .aside .info-unit ul li span {
    display: inline-block;
    vertical-align: top;
    width: 60%;
  }

  .info-content li label {
    display: inline-block;
    width: 40%;
  }

  .info-content li span {
    display: inline-block;
    vertical-align: top;
    width: 40%;
  }
  .container .main {
    position: relative;
    margin-left: 26rem;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 20px #bbb;
    box-sizing: border-box;
    padding: 1rem;
  }

  .container .main .info-unit ul {
    box-sizing: border-box;
    padding-left: 1.2rem;
    padding-right: 0.8rem;
  }

  .container .main .info-unit ul li {
    margin-bottom: 1rem;
    list-style: disc;
  }

  .container .main .info-unit ul li h3 .link {
    font-size: .5rem;
    border: 1px solid #4db6ac;
    padding: 1px 3px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    margin-left: .5rem;
  }

  .container .main .info-unit ul li h3 time {
    text-align: right;
    float: right;
  }

  .container .main .info-unit ul li .info-content li {
    list-style: circle;
    margin: 0;
  }

  .container .main .info-unit ul li .info-content .fa {
    font-size: 1em;
  }


  /* -------------------------------------------------
   * 自定义部分
   * ------------------------------------------------- */
  .fa {
    font-size: 1.2em;
  }
  h1{
    font-size: 2em;
  }

  h2 {
    font-size: 1.2em;
  }

  h3 {
    font-size: 1.1em;
  }

  hr {
    margin-bottom: .4em;
  }

  aside {
    position: fixed;
    right: 0;
    top: 30%;
    z-index: 2;
  }

  aside ul li {
    margin-bottom: 10px;
    -webkit-border-radius: 10px 0 0 10px;
    border-radius: 19px 0 0 10px;
    -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
    background: #1abc9c;
  }

  aside ul li a {
    display: inline-block;
    width: 80px;
    height: 38px;
    line-height: 38px;
    padding-left: 10px;
    color: #fff;
  }

  mark {
    background: rgba(232, 232, 232, 0.8);
  }

  @media screen and (max-width: 1169px) {
    .container .info-unit h3 span {
      display: block;
    }

    .container .info-unit h3 span.link {
      display: inline;
    }

    .container .project h3 span {
      display: inline;
    }

    .container .project h3 time {
      display: block;
    }

    .container .main .info-unit ul li h3 time {
      float: none;
      text-align: left;
    }
  }

  @media screen and (max-width: 1034px) {
    body {
      padding: 1rem 3%;
    }
  }

  @media screen and (max-width: 750px) {
    .container .aside {
      position: static;
      width: 95%;
      margin: 0 auto;
    }

    .container .main {
      position: static;
      margin-left: 0;
      width: 95%;
      margin: 0 auto;
      margin-top: 1.5rem;
    }

    #nav-m {
      display: none;
      position: fixed;
      width: 28px;
      height: 28px;
      right: 10px;
      bottom: 20px;
      box-shadow: 0 5px 20px #bbb;
      border-radius: 50%;
    }

    #nav-m svg {
      width: 28px;
      height: 28px;
    }

    aside {
      display: none;
    }
  }


</style>
